import Vue from 'vue'
import Vuex from 'vuex'
import user from './modules/user'
import mission from './modules/mission'
import getters from '@/store/getters'
import createPersistedState from 'vuex-persistedstate'
Vue.use(Vuex)

const store = new Vuex.Store({
  modules: {
    // app,
    // settings,
    mission,
    user
  },

  getters,
  plugins: [
    createPersistedState({
      paths: ['user.token', 'mission.landDetail', 'mission.missionDetail', 'user.routerName', 'user.userInfo', 'user.baseData']
    })
  ]
})

export default store
